#define _CRT_SECURE_NO_WARNINGS 1
#include"ListNode.h"




void test1()
{
	ListNode* plist = ListGreate();
	ListpushBack(plist, 1);
	ListpushBack(plist, 2);
	ListpushBack(plist, 3);
	ListpushBack(plist, 4);
	ListpushBack(plist, 5);
	ListpushBack(plist, 6);
	ListPrint(plist);

	ListPopBack(plist);
	ListPopBack(plist);
	ListPopBack(plist);
	ListPopBack(plist);
	ListPopBack(plist);
	ListPopBack(plist);
	ListPrint(plist);
}
void test2()
{
	ListNode* plist = ListGreate();
	ListpushBack(plist, 1);
	ListpushBack(plist, 2);
	ListpushBack(plist, 3);
	ListpushBack(plist, 4);
	ListpushBack(plist, 5);
	ListpushBack(plist, 6);
	ListPrint(plist);

	ListPushFront(plist, 30);
	ListPushFront(plist, 40);

	ListPrint(plist);

	ListPopFront(plist);
	ListPopFront(plist);
	ListPopFront(plist);
	ListPopFront(plist);
	ListPopFront(plist);
	ListPopFront(plist);
	ListPopFront(plist);
	ListPopFront(plist);

	ListPrint(plist);


}


void test3()
{
	ListNode* plist = ListGreate();
	ListpushBack(plist, 1);
	ListpushBack(plist, 2);
	ListpushBack(plist, 3);
	ListpushBack(plist, 4);
	ListpushBack(plist, 5);
	ListpushBack(plist, 6);
	ListPrint(plist);

	ListNode* Find = ListFind(plist, 3);
	ListInsert(Find, 20);
	ListPrint(plist);
	ListNode* Find2 = ListFind(plist, 4);
	ListErase(Find2);
	ListPrint(plist);

}

void test4()
{
	ListNode* plist = ListGreate();
	ListpushBack(plist, 1);
	ListpushBack(plist, 2);
	ListpushBack(plist, 3);
	ListpushBack(plist, 4);
	ListpushBack(plist, 5);
	ListpushBack(plist, 6);
	ListPrint(plist);

	ListDestory(plist);
	//ListPrint(plist);

}
int main()
{
	//test1();
	//test2();
	//test3();
	test4();
	return 0;
}